repo: Fix race condition in async checkout
authorColin Walters <walters@verbum.org>
Tue, 30 Apr 2013 23:34:20 +0000 (19:34 -0400)
committerColin Walters <walters@verbum.org>
Tue, 30 Apr 2013 23:34:20 +0000 (19:34 -0400)
commitf4327cc6a0f3fb0df9de52d03d8f0384d10c264c
tree709759f5d31c71e5d859537991e32de43bf470d2
parent8e4b296a965542bf15cf12bf4f6f67c9570f8707
repo: Fix race condition in async checkout

When multiple threads need to uncompress an object, there was
a race condition where thread A could get EEXIST, unlink,
then thread B calls linkat(), then thread A tries to link() but
fails.

We can just loop in this case.
src/libostree/ostree-repo.c